<?php 
/*------------------------------------------------------------------------
 # mod_lofuserpanel - Lof UserPanel Module
 # ------------------------------------------------------------------------
 # author    LandOfCoder
 # copyright Copyright (C) 2010 loftheme.com. All Rights Reserved.
 # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 # Websites: http://www.landofcoder.com
 # Technical Support:  Forum - http://www.landofcoder.com/forum.html
-------------------------------------------------------------------------*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );  
?>
<div class="lof-userpanel" id="lof-userpanel">
	
    <div class="lof-panels-wrapper">
    	<div style=" float:left;"><?php echo JText::_("Welcome Guest , ");?></div>
    	<?php if( $user->id <=0 ): ?>
       <span style=" float:left;"><?php echo JText::_(" please ");?></span>
    	<div class="panel-login"> 
        	<div  class="lof-button"><a href="#lof-login-panel" rel="lof-boxed" ><span><?php echo JText::_("Login");?></span></a></div>
                <!-- LEO LOGIN PANEL -->
                <div class="lof-pnlogin lof-panel" id="lof-login-panel">
                    <div class="panel-wrapper">
                    <?php require( $loginPath ); ?> 
                    </div>
                </div>
                <!-- END_LEO LOGIN PANEL -->
       	</div> 
         <?php if( $view !="registration" ): ?>
          <span style=" float:left;"><?php echo JText::_("or ");?></span>
            <div class="panel-register">
                <div  class="lof-button"><a href="#lof-register-panel" rel="lof-boxed"><span><?php echo JText::_("Create an account");?></span></a></div>
                <!-- LEO REGISTER PANEL -->
                <div class="lof-pnregister lof-panel" id="lof-register-panel">
                    <div class="panel-wrapper">
                    <?php require( $registerPath ); ?> 
                    </div>
                </div>
                <!-- END_LEO REGISTER PANEL -->
                
            </div>
            <?php endif; ?>
        <?php endif; ?>
        
		<?php if( $user->id ): ?>
        <div class="panel-logout">
            <div class="lof-button"><a href="#lof-logout-panel"  rel="lof-boxed"><span> 
                 <?php if($params->get('name') == 0) : {
                    echo JText::sprintf('MOD_LOFUP_HINAME', $user->get('name'));
                } else : {
                    echo JText::sprintf('MOD_LOFUP_HINAME', $user->get('username'));
                } endif; ?>
            </span></a></div>
            
            <div class="lof-pnlogout lof-panel" id="lof-logout-panel">
                <div class="panel-wrapper">
                <?php require( $logoutPath ); ?> 
                </div>
                <div class="clr clearfix"></div>
            </div>
    
        </div>    
        <?php endif; ?>
        <div class="clr"></div>
    </div>
</div>